<?php
require 'funcoes_js.js';
if(isset($_SESSION['sessao_ok'])){
 $NotId = $_GET['idN'];
 $urlExt = $_GET['urlext'];
 if(strlen($urlExt)<=0){
   $sql = "SELECT * FROM noticias WHERE id = '".$NotId."'";
   $result = mysql_query($sql);
   $res=mysql_fetch_array($result);
	$id = $res[0];
	$titulo = $res[1];
	$texto = $res[2];
	$img = $res [4];
	$urlBanco = $res[5];
	$Total= $id;   
   ?>  
    <div id="rightContent">
    <table width="594" height="180" border="0">
      <tr>
        <td height="60" align="center"><img src="<?php echo $img ?>" alt="Casa" title="" width="250" height="250" /></td>
      </tr>
      <tr>
        <td height="23"><h1><?php echo utf8_encode($titulo) ?></h1></td>
      </tr>
      <tr>
        <td><?php echo utf8_encode($texto) ?></td>
      </tr>
   </table>
<?php   
  }else{
?><script language="JavaScript">
     window.location="<?php utf8_encode($urlExt) ?>";
</script>
<?php
}
?>
</div>
<?php
}else{
?>
  <script language= "JavaScript">
	redirecionar();
  </script>
<?php
}
?>
